<?php
use \tpfcore\Core;
?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<!-- Set render engine for 360 browser -->
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- HTML5 shim for IE8 support of HTML5 elements -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js">
			</script>
		<![endif]-->
		<link href="{$admin_assets_path}/css/theme.min.css" rel="stylesheet">
		<link href="{$admin_assets_path}/css/simplebootadmin.css" rel="stylesheet">
		<link href="{$admin_assets_path}/css/default.css" rel="stylesheet" />
		<link href="{$admin_assets_path}/css/font-awesome.min.css"
		rel="stylesheet" type="text/css">
		<style>
			.length_3{width: 180px;} form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
			.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;} .table-list{margin-bottom:
			0px;}
		</style>
		<!--[if IE 7]>
			<link rel="stylesheet" href="{$admin_assets_path}/css/font-awesome-ie7.min.css">
		<![endif]-->
		<script type="text/javascript">
			//全局变量
			var GV = {
				WEB_ROOT:"",
				DIMAUB: "/",
				JS_ROOT: "/theme/backend/assets/js/",
				TOKEN: ""
			};
		</script>
		<!-- Le javascript==================================================-
		-> <!-- Placed at the end of the document so the pages load faster -->
		<script src="{$admin_assets_path}/js/jquery.js"></script>
		<script src="{$admin_assets_path}/js/wind.js"></script>
		<script src="{$admin_assets_path}/js/bootstrap.min.js"></script>
	</head>
	<body>
		<div class="wrap js-check-wrap">
			<ul class="nav nav-tabs">
				<li class="active"><a href="{:url('cms/Fields/index',['form_id'=>$list[0]['id']])}">字段管理</a></li>
				<li><a href="{:url('cms/Fields/add',['form_id'=>$list[0]['id']])}">添加字段</a></li>
				<li style="float: right;"><a href="{:url('cms/CustomForm/index')}">表单管理</a></li>
			</ul>
			<form method="post" class="js-ajax-form" action="">
				<table class="table table-hover table-bordered table-list">
					<thead>
						<tr>
							<th width="50">key</th>
							<th>字段类型</th>
							<th>字段标题</th>
							<th>字段名</th>
							<th width="120">操作</th>
						</tr>
					</thead>
					<tbody>
						{empty name="list[0]['fields']"}
						<tr><td colspan="5">没有数据</td></tr>
						{else/}
						{volist name="list[0]['fields']" id="vo"}
						<tr>
							<td>{$key}</td>
							<td>{$vo.type}</td>
							<td>{$vo.title}</td>
							<td>{$vo.name}</td>
							<td>
								<a href="{:url('cms/Fields/edit',['id'=>$key,'form_id'=>$list[0]['id']])}">
									修改
								</a> | 
								<a href="{:url('cms/Fields/del',['id'=>$key,'form_id'=>$list[0]['id']])}" data-msg="删除表单将删除对应的表数据，请慎重操作？" class="js-ajax-dialog-btn">
									删除
								</a>
							</td>
						</tr>
						{/volist}
						{/empty}
					</tbody>
				</table>
			</form>
		</div>
		<script src="{$admin_assets_path}/js/common.js"></script>
	</body>

</html>